<template>
  <a-card :bordered="false">
    <s-table
      :alert="alert"
      :columns="columns"
      :data="loadData"
      :rowKey="record => record.id"
      bordered
      ref="table"
    >
    </s-table>
  </a-card>

</template>

<script>
  import { TableMixin } from '@/mixins/TableMixin'
  import { fetchList } from '@api/boms/product'

  export default {
    mixins: [TableMixin],
    name: 'product',
    data() {
      return {
        columns: [
          {
            title: 'BOM编号',
            dataIndex: 'number'
          },
          {
            title: '产品名称',
            dataIndex: 'name'
          },
          {
            title: '版本号',
            dataIndex: 'version'
          },
          {
            title: '是否生效',
            dataIndex: 'iseffective'
          },
          {
            title: '发布日期',
            dataIndex: 'releaseDate'
          }
        ],
        queryParam: {
          name: '',
          type: ''
        },
        loadData: parameter => {
          return fetchList(
            Object.assign(parameter, this.queryParam)
          ).then(res => {
            return res.data
          })
        }
      }
    },
    methods: {
    
    }
  }
</script>

<style scoped>

</style>